import { request } from "@/api";
import { API } from "@/api/modules/dwh/typings";

/** delete GET /tableColumn/delete */
export async function deleteUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.PlainResultboolean>("/tableColumn/delete", {
    method: "GET",
    params: {
      ...params
    },
    ...(options || {})
  });
}

/** list GET /tableColumn/list */
export async function listUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.ListResultTableColumnVo>("/tableColumn/list", {
    method: "GET",
    params: {
      ...params
    },
    ...(options || {})
  });
}

/** listRoleColumnCode POST /tableColumn/listRoleColumnCode */
export async function listRoleColumnCodeUsingPOST(body: API.RoleColumnParam, options?: { [key: string]: any }) {
  return request<API.ListResultstring>("/tableColumn/listRoleColumnCode", {
    method: "POST",
    headers: {
      "Content-Type": "application/json"
    },
    data: body,
    ...(options || {})
  });
}

/** saveOrUpdate POST /tableColumn/saveOrUpdate */
export async function saveOrUpdateUsingPOST(body: API.TableColumnParam, options?: { [key: string]: any }) {
  return request<API.PlainResultboolean>("/tableColumn/saveOrUpdate", {
    method: "POST",
    headers: {
      "Content-Type": "application/json"
    },
    data: body,
    ...(options || {})
  });
}

/** sortTableColumn POST /tableColumn/sortTableColumn */
export async function sortTableColumnUsingPOST(body: API.TableColumnSortParam, options?: { [key: string]: any }) {
  return request<API.PlainResultboolean>("/tableColumn/sortTableColumn", {
    method: "POST",
    headers: {
      "Content-Type": "application/json"
    },
    data: body,
    ...(options || {})
  });
}
